package com.lhm.mapper;

import com.lhm.entity.Cart;
import com.lhm.entity.CartBook;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CartMapper {
    Cart findOne(int id);

    Cart findByBookidUid(@Param("uid") int uid, @Param("bookid") int bookid);

    List<CartBook> findByUid(int uid);

    void remove(int id);

    void update(@Param("id") int id, @Param("num") int num);

    void add(Cart cart);
}
